package cn.lxinet.lxms.system.mapper;

import cn.lxinet.lxms.framework.core.vo.Page;
import cn.lxinet.lxms.framework.mybatis.mapper.BaseMapper;
import cn.lxinet.lxms.system.entity.SysUser;
import cn.lxinet.lxms.system.vo.SysUserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    List<SysUserVo> list(@Param("page") Page page, @Param("deptIdList") List<Long> deptIdList, @Param("name") String name, @Param("realName") String realName,
                         @Param("email") String email, @Param("phone") String phone, @Param("sex") Integer sex, @Param("status") Integer status);

    SysUser findByName(String name);

    SysUser findByPhone(String phone);

    SysUser findByEmail(String email);

    void loginSuccess(@Param("id") Long id, @Param("ip") String ip);
}
